import request from "@/utils/request";

export function getResourceTypeList() {
  return request({
    url: "/resourcevisualization/resource/getResourceTypeList",
    method: "get",
  });
}

export function getResourceTypeByName(data) {
  return request({
    url: "/resourcevisualization/resource/getResourceTypeByName/" + data,
    method: "get",
  });
}

export function addResourceType(data) {
  return request({
    url: "/resourcevisualization/resource/addResourceType",
    method: "post",
    data,
  });
}

export function deleteResourceTypeByName(data) {
  return request({
    url:
      "/resourcevisualization/resource/deleteResourceTypeByName?name=" + data,
    method: "post",
  });
}

export function updateResourceTypeByName(data) {
  return request({
    url: "/resourcevisualization/resource/updateResourceTypeByName",
    method: "post",
    data,
  });
}
